package com.csxh.bookstore.action;

import java.util.List;

import javax.annotation.Resource;

import org.apache.struts2.ServletActionContext;

import com.csxh.bookstore.bean.Book;
import com.csxh.bookstore.service.BookService;
import com.opensymphony.xwork2.Action;

public class BookAction {

	@Resource
	private BookService bookService;

	public String home() {

		System.out.println("home");
		List<Book> list = bookService.findAllWithOrderBy("salenum", "desc");
        ServletActionContext.getRequest().setAttribute("bookList", list);
        
		return Action.NONE;
	}

}
